package com.kobeliu.entity;

import java.util.HashMap;
import java.util.Scanner;

/**
 * 求最长递减子序列
 */
public class Demo_6 {

    public static void main(String[] args) {

        int[] nums = {389,207,155,300,299,170,158,65};

        int[] dp = new int[8];

        dp[0] = 0;
        dp[1] = 1;

        for (int i = 2; i < 8; i++) {
            if(nums[i]<nums[i-1]){
                dp[i] = dp[i-1]+1;
            }else{
                dp[i] = dp[i-1];
            }
        }

        HashMap<Integer,Integer> m = new HashMap<Integer, Integer>();

        System.out.println(dp[7]);
    }
}
